<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</meta>
<title>F().pos</title>
<link type="text/css" rel="stylesheet" href="../css/admin.css" />
<link type="text/css" rel="stylesheet" href="../css/item_show.css" />
<script type="text/javascript" src="../../1st.js"></script>
<script type="text/javascript" src="../../1st.highlight.js"></script>
</head>
<body id="split">
<div id="content">
	<div rel="F.param">
		<h2><span>返回值:</span>F().pos</h2>
					<h3>概述 : 设置或获取元素的位置</h3>
									<h3>语法1：F().pos()</h3>
							<div>描述：获取元素的位置</div>
						<table class="args">
				<!--caption>参数列表：(0)</caption-->
				<tr><th>参数名称</th><th>类型</th><th>描述</th></tr>
								<tr><td colspan="3">&nbsp;</td></tr>
				<tr><td>返回值</td><td>Array</td><td>返回 [x,y]</td></tr>
			</table>
					<h3>语法2：F().pos(1)</h3>
							<div>描述：获取元素的位置</div>
						<table class="args">
				<!--caption>参数列表：(1)</caption-->
				<tr><th>参数名称</th><th>类型</th><th>描述</th></tr>
									<tr><td><strong>is_return_obj</strong></td><td>Number</td><td>固定为1</td></tr>
								<tr><td colspan="3">&nbsp;</td></tr>
				<tr><td>返回值</td><td>Object</td><td>返回 {x:X坐标值,y:Y坐标值}</td></tr>
			</table>
					<h3>语法3：F().pos(x,y)</h3>
							<div>描述：设置元素的位置</div>
						<table class="args">
				<!--caption>参数列表：(2)</caption-->
				<tr><th>参数名称</th><th>类型</th><th>描述</th></tr>
									<tr><td><strong>x</strong></td><td>Number</td><td>X坐标值</td></tr>
									<tr><td><strong>y</strong></td><td>Number</td><td>Y坐标值</td></tr>
								<tr><td colspan="3">&nbsp;</td></tr>
				<tr><td>返回值</td><td>fdom</td><td></td></tr>
			</table>
				<div class="example">
			<h3>示例 : </h3>
							<h5 xmlns="">CSS代码:</h5>
				<pre xmlns=""><code id="cssbox"></code></pre>
						
							<h5 xmlns="">HTML代码:</h5>
				<pre xmlns=""><code id="htmlbox"></code></pre>
									
				<h5 xmlns="">JS代码:</h5>
				<pre xmlns=""><code id="jsbox"></code></pre>
										
				<h5 xmlns="">结果:</h5>
				<pre xmlns=""><code id="resultbox"></code><code></code></pre>
					</div>
		<div style="text-align:right">
			
					
				<button onclick="window.open('../codepages/127.html');">运行代码</button>
						
		</div><br/>	
		<div>
			<h3>同类参考 :</h3>
			<div>
							<span><a href='123.html'>F().left</a></span>&#12288;|&#12288;							<span><a href='124.html'>F().top</a></span>&#12288;|&#12288;							<span><a href='125.html'>F().width</a></span>&#12288;|&#12288;							<span><a href='126.html'>F().height</a></span>&#12288;|&#12288;							<span><a href='128.html'>F().size</a></span>&#12288;|&#12288;							<span><a href='152.html'>F().rect</a></span>&#12288;|&#12288;							<span><a href='93.html'>F().offset</a></span>&#12288;|&#12288;							<span><a href='150.html'>F().center</a></span>&#12288;|&#12288;							<span><a href='147.html'>F().out</a></span>&#12288;|&#12288;							<span><a href='138.html'>F().midpoint</a></span>&#12288;|&#12288;							<span><a href='44.html'>F().abspos</a></span>&#12288;|&#12288;							<span><a href='83.html'>F().scaleTo</a></span>&#12288;|&#12288;							<span><a href='158.html'>F().scrollLeft</a></span>&#12288;|&#12288;							<span><a href='185.html'>F().scrollTop</a></span>						</div>
		</div>
	</div>
</div><br />

<textarea id="css" style="display:none;">#box{position:absolute; width:100px; height:100px; background-color:#ff00ff;}</textarea>
<textarea id="html" style="display:none;"><div id="box"></div></textarea>
<textarea id="js" style="display:none;">alert(F("box").pos());
F("box").pos(300,300);
alert(F("box").pos());</textarea>
<textarea id="result" style="display:none;">[8,8]
[300,300]</textarea>


<script type="text/javascript">
var css = F('css').val();
var html = F('html').val();		
var js = F('js').val();
var result = F('result').val();
css && F('cssbox').highlight(css, "css");
html && F('htmlbox').highlight(html, "html");
js && F('jsbox').highlight(js, "js");
result && F('resultbox').highlight(result,"js");
</script>

</body>
</html>